import java.util. * ;
public class ParaPass {
    public static void main(String[] args) {
        int[ ] a = new int[ 10];
        Scanner reader = new Scanner( System.in) ;
        System. out.println("请输入10个数组元素的值");
        for( int i= 0 ; i<a.length; i++)
            a[i] = reader. nextInt( );
        MaxNum nMax = new MaxNum();
        nMax.max(a);
    }
}

class MaxNum {
    public void max(int[] array) {
        int temp = -Integer.MAX_VALUE;
        //定义整型变量temp 并赋值整数范围的最小值
        for (int i = 0; i < array.length; i++)
            if (temp < array[i])
                temp = array[i];
        System.out.println("数组元素的最大值是:" + temp);
    }
}
